Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make devsetup/cifwm_prepare not fail when rerun #304

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

queria
Copy link

@queria queria commented Jun 1, 2023

Currently if one tries to rerun cifwm_prepare it fails on git cloning attempt since the directory is already in place.

Example of failure:

As that is not expected from make target, make it so that this target depends on the directory existing target, which itself calls the git clone for its creation.

@queria queria requested a review from cjeanner June 1, 2023 12:01
@openshift-ci openshift-ci bot requested review from abays and gibizer June 1, 2023 12:01
Copy link
Contributor

@cjeanner cjeanner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If really, I'd rather get something checking for the directory availability, if already there, git pull in order to ensure we're up-to-date... ?

@cjeanner
Copy link
Contributor

cjeanner commented Jun 2, 2023

/lgtm

@softwarefactory-project-zuul
Copy link

@raukadah
Copy link
Contributor

raukadah commented Jun 7, 2023

recheck

@softwarefactory-project-zuul
Copy link

Copy link
Contributor

@marios marios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@@ -175,10 +175,13 @@ edpm_deploy_instance: ## Spin a instance on edpm node
edpm_play_cleanup: ## Cleanup EDPM openstackansibleee resource
-oc delete openstackansibleee deploy-external-dataplane-compute

.PHONY: cifmw_prepare
cifmw_prepare: ## Clone the ci-framework repository in the ci-framework directory. That location is ignored from git.
./ci-framework:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

names ;)
i'd call this something more descriptive though, like ci-framework-clone or somesuch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yep, i would guess the aim was to also invoke the setup part, not sure - with that (renaming...) I would prefer to wait for Cedric.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can add some more "checks" in there in order to ensure we can consume the framework - for instance "is ansible present" and related? or, even, run an actual task that will create the venv and make things ready to consume?

I really added that one in the very-very early stages of the framework, just to show "hey, we're here now". We can of course evolve (actually, we must evolve ;)).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what would be the recommendation for this PR please?
Rename (but that would involve changing all the docs / local flows too)? Or add more setup steps (any specific ones to add, or I can pick any)? Or leave it be as is?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for discussion today lets get this merged and you can update for more functionality as needed (imo)

Copy link
Contributor

@marios marios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -175,10 +175,13 @@ edpm_deploy_instance: ## Spin a instance on edpm node
edpm_play_cleanup: ## Cleanup EDPM openstackansibleee resource
-oc delete openstackansibleee deploy-external-dataplane-compute

.PHONY: cifmw_prepare
cifmw_prepare: ## Clone the ci-framework repository in the ci-framework directory. That location is ignored from git.
./ci-framework:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for discussion today lets get this merged and you can update for more functionality as needed (imo)

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marios, queria
Once this PR has been reviewed and has the lgtm label, please assign raukadah for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Currently if one tries to rerun cifwm_prepare it fails
on git cloning attempt since the directory is already in place.

Example of failure:
> + make cifmw_prepare
> git clone https://github.com/openstack-k8s-operators/ci-framework ci-framework
> fatal: destination path 'ci-framework' already exists and is not an empty directory.
> make: *** [Makefile:180: cifmw_prepare] Error 128

As that is not expected from make target, make it so that
this target depends on the directory existing target,
which itself calls the git clone for its creation.
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2023

New changes are detected. LGTM label has been removed.

@softwarefactory-project-zuul
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants